-- GENERATED SPELL FOR [Scarlet Evoker] --


function spell0_4289(pUnit, Event) --@Fire Shield III,n/a--
pUnit:FullCastSpellOnTarget(2601,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4289', 31000, 1)
end

function spell1_4289(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4289', 3000, 1)
end

function spell2_4289(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(20296,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4289', 11000, 1)
end

function Sorts_4289(pUnit, Event)
local choix_sorts_4289 = math.random(0, 2)
if choix_sorts_4289 == 0 then
pUnit:RegisterEvent('spell0_4289', 1, 1)
end
if choix_sorts_4289 == 1 then
pUnit:RegisterEvent('spell1_4289', 1, 1)
end
if choix_sorts_4289 == 2 then
pUnit:RegisterEvent('spell2_4289', 1, 1)
end
end

function mob4289_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4289', math.random(1500, 3000), 1)
end

function mob4289_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4289_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4289_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4289, 1, 'mob4289_Action')
RegisterUnitEvent(4289, 2, 'mob4289_Leave')
RegisterUnitEvent(4289, 3, 'mob4289_Kill')
RegisterUnitEvent(4289, 4, 'mob4289_Die')
